Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NSFS] Fix list objects ordering to follow AWS S3 #8324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tangledbytes
Copy link
Member

@tangledbytes tangledbytes commented Sep 3, 2024

Explain the changes

This PR replaces the pre-existing sorting functions in listObjects (NSFS) with a new one which tries to treat strings as UTF8 encoded Uint8Arrays. This helps with sorting the array of strings in a similar fashion as AWS S3 does.

Issues: Fixed #xxx / Gap #xxx

Fixes #8218

Testing Instructions:

  1. ./node_modules/.bin/mocha src/test/unit_tests/test_namespace_fs.js
  2. ./node_modules/.bin/jest src/test/unit_tests/jest_tests/js_utils.test.js
  • Doc added/updated
  • Tests added

Signed-off-by: Utkarsh Srivastava <[email protected]>

add more tests for asserting the correctness of utf8 sorting

Signed-off-by: Utkarsh Srivastava <[email protected]>

fix order when markers are involved

Signed-off-by: Utkarsh Srivastava <[email protected]>

add caching for name buffers - lifetime limited to per invocation of list_objects

Signed-off-by: Utkarsh Srivastava <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List objects with unicode - should sort keys using byte-by-byte order and not using utf8 sort order
1 participant